package br.com.datatraffic.fiscal.entidades;

// Generated 10/07/2009 10:49:54 by Hibernate Tools 3.2.0.b9

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EquipamentoServico generated by hbm2java
 */
@Entity
@Table(name = "TBEQUIPAMENTO_SERVICO")
public class EquipamentoServico implements java.io.Serializable {

	private Long id;
	private Equipamento5 equipamento;
	private TipoServico tipoServico;
	private Long porta;
	private String enderecoIp;

	public EquipamentoServico() {
	}

	public EquipamentoServico(Long id, TipoServico tipoServico) {
		this.id = id;
		this.tipoServico = tipoServico;
	}

	public EquipamentoServico(Long id, Equipamento5 equipamento, TipoServico tipoServico, Long porta, String enderecoIp) {
		this.id = id;
		this.equipamento = equipamento;
		this.tipoServico = tipoServico;
		this.porta = porta;
		this.enderecoIp = enderecoIp;
	}

	@Id
	@GeneratedValue
	@Column(name = "EQUIPAMENTO_SERVICO_ID", unique = true, nullable = false, precision = 38, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EQUIPAMENTO_ID")
	public Equipamento5 getEquipamento() {
		return this.equipamento;
	}

	public void setEquipamento(Equipamento5 equipamento) {
		this.equipamento = equipamento;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TIPO_SERVICO_ID", nullable = false)
	public TipoServico getTipoServico() {
		return this.tipoServico;
	}

	public void setTipoServico(TipoServico tipoServico) {
		this.tipoServico = tipoServico;
	}

	@Column(name = "PORTA", precision = 38, scale = 0)
	public Long getPorta() {
		return this.porta;
	}

	public void setPorta(Long porta) {
		this.porta = porta;
	}

	@Column(name = "ENDERECO_IP", length = 16)
	public String getEnderecoIp() {
		return this.enderecoIp;
	}

	public void setEnderecoIp(String enderecoIp) {
		this.enderecoIp = enderecoIp;
	}

	// The following is extra code specified in the hbm.xml files
	private static final long serialVersionUID = 1L;
	// end of extra code specified in the hbm.xml files

}
